<?php 
@session_start();
include_once 'config.php';
include_once 'functions.php';
$is_admin = false;
?>
<html>
<head></head>
<body>
<h1><?php echo $project_name?></h1>
<?php 
$root_dir_name = dirname(__FILE__);
if (check_login()) {
	$is_admin = true;
	echo '<h2>Admin mode</h2>';
}?>
<table border='1'>
	<tr>
	<?php 
		foreach ($field_set as $field) {
			echo '<th>' . $field['title'] . '</th>';
		}
	?>
	<?php if ($is_admin) {
		echo '<th>';
		show_edit_link($root_dir_name . DIRECTORY_SEPARATOR . 'progress/progress.info', 'Edit progress');
		echo '</th>';
	}?>
	</tr>
	<?php 		
		show_progress_recur('progress');
	?>
</table>
</body>
</html>